class CreateNotes < ActiveRecord::Migration
  def change
    create_table :notes do |t|
      t.integer :project_id, :null => false, :default => 0
	    t.integer :group_id,   :null => false, :default => 0
      t.integer :folder_id,	 :null => false, :default => 0
      t.integer :member_id,  :null => false, :default => 0
      t.integer :user_id, 	 :null => false, :default => 0
      t.integer :to_user_id, :null => false, :default => 0
      t.integer :doc_id,	 :null => false, :default => 0
      t.string	:controller,		 :null => false, :default => ""
      t.string  :action,         :null => false, :default => ""
      t.integer :target_id,      :null => false, :default => ""
      t.string :target_name,    :null => false, :default => ""
      t.boolean :success,  :null => false, :default => false
      t.string 	:ip,		 :null => false, :default => "", :limit=>16
      t.string  :msg
      t.timestamps
    end
  end
end
